/*
 * @Author: xiaosihan 
 * @Date: 2023-08-07 21:12:48 
 * @Last Modified by: xiaosihan
 * @Last Modified time: 2024-03-25 03:47:28
 */


// 2d 预览
.preview2D {
  position: relative;
  margin: 20px;
  background-color: #f5f5f5;
  display: none;

  &.show {
    display: block;
  }

  &.showList {
    left: -50px;
  }

  .spin {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    :global(.ant-spin-dot-item) {
      background-color: #FF9E75;
    }
  }

  .left {
    position: absolute;
    z-index: 1;
    display: inline-block;
    width: 18px;
    height: 40px;
    line-height: 40px;
    background-color: #e1e1e1;
    overflow: hidden;
    top: 50%;
    left: 6px;
    transform: translate(0%, -50%);
    cursor: pointer;
    transition: all 0.2s;

    &:hover {
      background-color: #8f8f8f;
      color: #ffffff;
    }
  }

  .right {
    position: absolute;
    z-index: 1;
    display: inline-block;
    width: 18px;
    height: 50px;
    line-height: 40px;
    width: 18px;
    height: 40px;
    background-color: #e1e1e1;
    overflow: hidden;
    top: 50%;
    right: 6px;
    transform: translate(0%, -50%);
    cursor: pointer;
    transition: all 0.2s;

    &:hover {
      background-color: #8f8f8f;
      color: #ffffff;
    }
  }

  .canvas_box {
    display: inline-block;
    // width: 280px;
    // height: 280px;
    min-height: 280px;
    position: relative;
    white-space: pre;
    overflow-y: hidden;
    overflow-x: auto;

    &::-webkit-scrollbar {
      width: 0px;
      height: 0px;
      background-color: rgba(0, 0, 0, 0);
    }

    &::-webkit-scrollbar-track {
      box-shadow: inset 0 0 6px rgba(0, 0, 0, 0);
      border-radius: 2px;
      background-color: rgba(0, 0, 0, 0);
    }

    &::-webkit-scrollbar-thumb {
      border-radius: 2px;
      background-color: #ff9729;
    }

    .canvas {
      display: inline-block;
      width: 100%;
      vertical-align: middle;
    }
  }

  .list {
    display: inline-block;
    width: 108px;
    overflow-y: auto;
    position: absolute;
    left: calc(100% + 10px);
    top: 0px;
    height: 100%;

    canvas {
      background-color: #F5F5F5;
      border-radius: 10px;
      border: 2px solid #ffffff;
      cursor: pointer;

      &.active {
        border: 2px solid #FE7902 !important;
      }

      &:hover {
        border: 2px solid #cccccc;
      }
    }

    &::-webkit-scrollbar {
      width: 2px;
      height: 2px;
      background-color: rgba(0, 0, 0, 0);
    }

    &::-webkit-scrollbar-track {
      box-shadow: inset 0 0 6px rgba(0, 0, 0, 0);
      border-radius: 2px;
      background-color: rgba(0, 0, 0, 0);
    }

    &::-webkit-scrollbar-thumb {
      border-radius: 2px;
      background-color: #ff9729;
    }
  }
}